﻿package kliment.utils {
	/**
	 * ...
	 * @author Kliment
	 * @version	1.0.5
	 * 
	 * class name: kliment.utils._Object
	 */
	public class _Object {
		
		static public function copy(value:Object):Object {
			return copyTo(value, new Object());
		}
		
		static public function propertyIsEnumerable(target:Object, V:* = null):Boolean {
			return target.propertyIsEnumerable(V);
		}
		
		static public function setPropertyIsEnumerable(target:Object, name:String, isEnum:Boolean = true):void {
			target.setPropertyIsEnumerable(name, isEnum);
		}
		
		static public function copyTo(from:Object, to:Object):Object {
			for (var i in from) 
				to[i] = from[i];
			return to;
		}
		
		static public function getProperty(target:*, property:String):* {
			if (target[property]) 
				return target[property];
			return null;
		}
		
		static public function setProperty(target:*, property:String, value:*):* { 
			return (target[property] = value);
		}
	}

}